package com.flycat.common.enumeration;

import java.util.Arrays;

/**
 * Created by linkun on 2017/9/25.
 */
public enum  StatusEnum {

    OFF_LINE(Byte.valueOf("0"), "下线"),
    ON_LINE(Byte.valueOf("1"), "上线"),
    ;

    public Byte status;

    public String msg;

    StatusEnum(Byte status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public static StatusEnum getEnum(Byte type) {
        return Arrays.stream(StatusEnum.values()).filter(item-> item.status.equals(type)).findFirst().get();
    }
}
